package com.weishuang.monitor.leader.commons.entity;

import com.weishuang.monitor.leader.commons.enums.CODEBASE;
import lombok.Data;

import java.io.Serializable;

@Data
public class Result<T> implements Serializable {

    private static final long serialVersionUID = -6447927105650567666L;
    private int code;
    
    private String msg;
    
    private T data;


    public Result() {
    }

    public Result(int code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public Result(int code, String msg) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    public Result(CODEBASE code) {
        this.code = code.getCode();
        this.msg = code.getMsg();
    }


}
